﻿using AutoMapper;
using StudentManagementSystem.Entities;
using StudentManagementSystem.Dtos;

namespace StudentManagementSystem.Profiles
{
    public class CompanyProfile : Profile
    {
        public CompanyProfile()
        {
            CreateMap<Company, CompanyDto>()
                .ForMember(
                dest => dest.CompanyName,
                opt => opt.MapFrom(src => src.Name));

            CreateMap<CompanyAddDto, Company>();
        }
    }
}
